<style>
/*添加*/
table {
	font-size:12px;
	color:#333333;
	font-family:"微软雅黑";
}
.col-sm-9 div {
	margin:2px auto
}
</style>
<div class="row">
  <div class="col-xs-12">
    <form method="post" class="form-horizontal" name="<{$controller}>_<{$action}>_form"
			id="<{$controller}>_<{$action}>_form"
			action="/Admin/<{$controller}>/save/id/<{if isset($data)}><{$data->id}><{/if}>">
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-1">上级菜单</label>
        <div class="col-sm-9">
          <select class="chosen-select" name="parentid">
            <option value="0">选择上级菜单</option>
            <{foreach from=$topmenus item=item}>
            <option value="<{$item->id}>" <{if isset($data)}><{if $data->parentid eq $item->id}>selected="selected"<{/if}><{/if}> ><{$item->title}></option>
            <{/foreach}>
          </select> 
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-1">菜单名称</label>
        <div class="col-sm-9">
          <input type="text" value="<{if isset($data)}><{$data->title}><{/if}>" id="form-field-2"
						 name="title" class="col-xs-10 col-sm-5" />
          <span class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-1">URL</label>
        <div class="col-sm-9">
          <input type="text" value="<{if isset($data)}><{$data->url}><{/if}>" id="form-field-2"
						 name="url" class="col-xs-10 col-sm-5" />
          <span class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-1">ICON</label>
        <div class="col-sm-9">
          <input type="text" value="<{if isset($data)}><{$data->icon}><{/if}>" id="form-field-2"
						 name="icon" class="col-xs-10 col-sm-5" />
          <span class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
	$(".chosen-select").chosen();
	$('.chosen-container').each(function() {
		$(this).find('a:first-child').css('width', '210px');
		$(this).find('.chosen-drop').css('width', '210px');
		$(this).find('.chosen-search input').css('width', '200px');
	});
</script> 